package com.xlobo.api.charge.service;

import org.json.JSONObject;

import com.ymt.base.YmatouBaseCall;
import com.ymttest.utils.EnvSetup;

/**
 * 计算FBX出库费用接口Call FreeMaker Template自动生成代码
 */
public class CalculateOutStoreFeeCall extends YmatouBaseCall {
	private static String opurl = "api/FbxChargeInfo/CalculateOutStoreFee";

	public CalculateOutStoreFeeCall() {
		super(EnvSetup.getSystemUrl("api_fbxchargeinf"), opurl, "POST", "JSON");
	}

	@Override
	public void addDefHeader() {
		client.addHeader("Accept", "text/xml,text/javascript,text/html,application/json");
		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}

	/**
	 * 获取IsSuccess
	 * 
	 * @return
	 */
	public String getMsg() {
		String Msg = null;
		try {
			Msg = new JSONObject(getReturnData()).getString("IsSuccess");
		} catch (Exception e) {
			e.printStackTrace();
		}
		return Msg;
	}

}